<?php

namespace DesignNew\Flyweight;

require('../vendor/autoload.php');
/**
 * 生产房门的工厂
 */
class FlyClient{

    public function __construct()
    {
        $this->run();
    }

    public function run()
    {
        $teaMaker = new TeaMaker();
        $shop = new TeaShop($teaMaker);

        $shop->takeOrder('less sugar', 1);
        $shop->takeOrder('more milk', 2);
        $shop->takeOrder('without sugar', 5);

        $shop->serve();
    }
}

$client = new FlyClient();